import request from '@/router/axios';

const prefix = '/api/blade-form/form-view'

export const getForm = (formCode, version) => {
  return request({
    url: `${prefix}/getForm`,
    method: 'get',
    params: {
      formCode,
      version
    }
  })
}

export const saveFormData = (row) => {
  return request({
    url: `${prefix}/saveFormData`,
    method: 'post',
    data: row
  })
}

export const getFormData = (formCode, version, rowId) => {
  return request({
    url: `${prefix}/getFormData`,
    method: 'get',
    params: {
      formCode,
      version,
      rowId
    }
  })
}
